library(ggplot2)
library(sf)

setwd('WORKING DIRECTORY')

cam_region <- read_sf('shapefiles/regionoutline.shp')
cam_region$sample <- 0
cam_region$sample[cam_region$NAME %in% c('Centre',
                                         'Ouest',
                                         'Littoral',
                                         'Sud')] <- 1

cameroon_survey <- read_sf('shapefiles/SurveySites.shp')
cameroon_capitals <- read_sf('shapefiles/regionCapitols.shp')

xcoords <- c(9.9, 15.5)
ycoords <- c(2.6, 8)

ggplot(cam_region) +
  geom_sf(color = 'black',
          aes(fill = as.factor(sample))) +
  scale_fill_manual(values = c('gray', 'white')) +
  geom_sf(data = cameroon_capitals,
          shape = 21, colour = "black", fill = "white", 
          size = 3, stroke = 1) +
  geom_sf(data = cameroon_capitals,
          colour = "black" ,
          size = 1) +
  geom_sf_text(data = cameroon_capitals, 
               aes(label = Name),
               size = 3,
               vjust = .5,
               hjust = -.18,
               ) +
  geom_sf_text(data = cam_region, 
               aes(label = NAME),
               fontface = 'bold',
               vjust = .1,
               hjust = .5,
               fun.geometry = st_point_on_surface,
               position=position_jitter()
               ) +
  geom_sf(data = cameroon_survey,
          color = 'darkgrey') +
  theme_bw() +
  labs(y = element_blank(),
       x = element_blank()) +
  coord_sf(xlim = xcoords*100000, 
           ylim = ycoords*100000, expand = TRUE) +
  theme(legend.position = 'none',
        panel.grid = element_blank(),
        axis.ticks = element_blank(),
        axis.text = element_blank())

ggsave('map-sample-sites.pdf',
       height = 6, width = 6, unit = 'in')
